package com.code.day04;

import java.util.Random;
import java.util.Scanner;

public class Demo01Random {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Random rd = new Random();

        int rdNumber = rd.nextInt(100) + 1;
        while (true) {
            int scNumber = sc.nextInt();
            if (scNumber > rdNumber) {
                System.out.println("猜大了");
            } else if (scNumber < rdNumber) {
                System.out.println("猜小了");
            } else {
                System.out.println("恭喜你，猜对了！");
                break;
            }
        }
    }
}
